﻿/// Copyright © 2013 Microsoft Corporation. 
/// This project is released under the Microsoft Public License (MS-PL)
///
namespace DataMorph.Common.Entities
{
    using System;

    using Microsoft.WindowsAzure.Storage.Table;

    public class DataSetEntity : TableEntity
    {
        public DataSetEntity(GenerationParameters generationParameter) 
        {
            this.PartitionKey = "Datasets";
            this.Name = generationParameter.Name;
            this.RowKey = this.Name;
            this.StorageAccountName = generationParameter.StorageAccountName;
            this.StorageAccountKey = generationParameter.StorageAccountKey;
            this.Requested = generationParameter.Requested;
            this.NumberOfFiles = generationParameter.NumberOfFiles;
            this.StartDateTime = generationParameter.StartDateTime;
            this.NumberOfDays = generationParameter.NumberOfDays;
            this.NumberOfTags = generationParameter.NumberOfTags;
            this.MaxFileSize = generationParameter.MaxFileSize;
            this.MinFileSize = generationParameter.MinFileSize;
        }

        public DataSetEntity()
        {
        }

        public string StorageAccountName { get; set; }

        public string StorageAccountKey { get; set; }

        public string Name { get; set; }

        public DateTime Requested { get; set; }

        public int NumberOfFiles { get; set; }

        public DateTime StartDateTime { get; set; }

        public int NumberOfDays { get; set; }

        public int NumberOfTags { get; set; }

        public int MaxFileSize { get; set; }

        public int MinFileSize { get; set; }
    }
}